package Comprehensive_01;

import java.util.Random;

public class Demo3 {
    public static void main(String[] args) {
        int[] arr = new int[10];
        int odds = 0;
        int events = 0;
        Random random = new Random();
        for (int i = 0; i < arr.length; i++) {
            arr[i] = random.nextInt(88) + 12;
            if (arr[i] % 2 == 0){
                odds += arr[i];
            } else {
                events += arr[i];
            }
        }
        System.out.println("偶数:" + odds + " 奇数:" + events);
    }
}
